<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddUtmToCouponTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('el_discount_coupon', function (Blueprint $table) {
            $table->string('utm_campaign')->nullable();  //用户领取优惠券的来源渠道，因商品注册礼而添加
            $table->string('utm_source')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('el_discount_coupon', function (Blueprint $table) {
            $table->dropColumn(['utm_campaign','utm_source']);
        });
    }
}
